package com.zcsy.commons.model;


/**
 * 系统常量类
 * @author tanghan
 * @version 2015年2月10日
 * @see Constants
 * @since
 */
public class Constants{
    
    /**
     * 状态
     */
    public static final int STATE_ENABLED = 1;
    public static final int STATE_DISABLED = 0;
    
    /**
     * 菜单状态
     */
    public static final int MENU_STATE_ENABLED = 1;
    public static final int MENU_STATE_DISABLED = 2;
    
    /**
     * 菜单级别
     */
    public static final short MENU_LEVEL_FIREST = 1;
    public static final short MENU_LEVEL_SECOND = 2;
    public static final short MENU_LEVEL_THREE = 3;
    
    /**
     * 商品分类级别
     */
    public static final int CATEGORY_LEVEL_FIREST = 1;
    public static final int CATEGORY_LEVEL_SECOND = 2;
    public static final int CATEGORY_LEVEL_THREE = 3;
    
    /**
     * 商城端，控制显示分类个数
     */
    public static final int CATEGORY_FIRST_LIMIT = 7;  //一级分类显示个数
    public static final int CATEGORY_THREE_LIMIT = 4; //三级分类显示个数
    
    /**
     * 默认密码
     */
    public static final String DEFALUT_PWD = "123456";
    
    /**
     * 系统登录保存在session中的key.
     */
    public static final String LOGIN_SESSION_KEY = "community_login";
    
    /**
     * 功能状态
     */
    public static final int FUNCTION_ENABLED = 1; //启用
    public static final int FUNCTION_DISABLED = 0; //停用
    
    /**
     * 已配置的流程标识
     */
    public static final String ENTRYAPPROVE_PROCESSKEY = "process";     //对应流程标识
    public static final String ENTRYAPPROVE_BUSINESSTABLE = "t_daily_employee_entryapprove";  //对应业务表表名
    
    /**
     * 缓存统一标识
     */
    public static final String CACHE_MENU = "cache_menus"; //菜单缓存
    
    /**
     * ftp根目录地址<br>
     */
    public static final String FTP_PATH = "http://120.24.84.202:9080/FTP/image/";
    
    /**
     * 图片的存放地址<br>
     */
    public static final String IMAGE_GOODS_LOGO_DIR = "image/goods/logo";
    public static final String IMAGE_GOODS_DETAIL_DIR = "image/goods/detail";
    
    /**
     * SQL操作结果返回值常量
     * -1为数据异常，自定义错误描述
     */
    public static final int SQL_RESULT_SUCCESS = 1;
    public static final int SQL_RESULT_FAILD = 0;
    public static final int SQL_RESULT_ERROR = -1;
    public static final int SQL_RESULT_FAILD_CUSTOM = -2;
    
    /**
     * 商品上下架
     */
    public static final int GOODS_AUDIT = 2;   //商品审核
    public static final int GOODS_SALE = 1;    //商品上架中
    public static final int GOODS_UNSALE = 0;  //商品下架
    
    /** 图片分成大、中、小3种形式压缩的尺寸 **/
    public static final int PIC_LARGE_SIZE = 1280;
    public static final int PIC_MIDDLE_SIZE = 600;
    public static final int PIC_SMALL_SIZE = 300;
    
    /**
     * 商品属性状态
     */
    public static final int ATTRIBUTE_ENABLED = 1; //启用
    public static final int ATTRIBUTE_DISABLED = 0; //停用
    
    /**
     * 全局属性个数上限
     */
    public static final int MAX_GLOBAL_ATTR = 4; 
    
    
    /**
     * 选择框未选择
     */
    public static final int SELECT_NONE = -1;
    
    /**
     * 几种常见的图片格式
     */
    public static final String IMAGE_TYPE_GIF = "gif";// 图形交换格式 

    public static final String IMAGE_TYPE_JPG = "jpg";// 联合照片专家组 

    public static final String IMAGE_TYPE_JPEG = "jpeg";// 联合照片专家组 

    public static final String IMAGE_TYPE_BMP = "bmp";// 英文Bitmap（位图）的简写，它是Windows操作系统中的标准图像文件格式 

    public static final String IMAGE_TYPE_PNG = "png";// 可移植网络图形 

    public static final String IMAGE_TYPE_PSD = "psd";// Photoshop的专用格式Photoshop 

    /**
     * 图片类型：1表示商品图片；2表示广告图片;3表示非遗项目附件;5表示传承人附件;6表示退货上传图片;7非遗新闻封面图片;8商品定制图片;9客户端启动广告;10产品定制图片;11创意投稿图片
     */
    public static final int IMAGE_TYPE_GOODS = 1;

    public static final int IMAGE_TYPE_ADS = 2;
    
    public static final int ATTACH_TYPE_INHER_PROJECT = 3;
    
    public static final int ATTACH_TYPE_INHER_INHERITORINFO = 5;
    
    public static final int RETURN_GOOD_IMAGE_TYPE = 6;
    
    public static final int ATTACH_TYPE_INTANGIBLE_NEWS_IMAGE = 7;
    
    public static final int GOOD_CUSTOM = 8;
    
    public static final int APP_AD_START = 9;//客户端启动广告
    
    public static final int CUSTOM = 10;//产品定制图片
    
    public static final int CREATIVE_INFO = 11;//创意投稿图片
    
    /**
     * 图片尺寸类型
     */
    public static final int PIC_TYPE_SMALL = 1;
    
    public static final int PIC_TYPE_MEDIUM = 2;
    
    public static final int PIC_TYPE_LARGE = 3;
    
    /**
     * 分类属性数据类型
     */
    public static final short ATTR_TEXT_SELECT = 0;
    public static final short ATTR_BETWEEN_SELECT = 1;
    public static final short ATTR_TEXT_INPUT = 2;
    
    /**
     * 模板类型选择
     */
    public static final int MODEL_TYPE_MSG = 0;//短息
    
    public static final int MODEL_TYPE_ANNC = 1;//公告
    
    public static final int UNSELECT_MODEL_TYPE = -1;//未选择
    
    /**
     * 逻辑删除中显示状态为1的类型，0不显示
     */
    public static final int MODEL_LOGIC_HIDE = 0;//隐藏
    public static final int MODEL_LOGIC_SHOW = 1;//显示
    
    /**
     * 设备类型
     */
    public static final int DEVIDE_TYPE_WEB = 1;//WEB
    public static final int DEVICE_TYPE_ANDROID = 2;//安卓
    public static final int DEVICE_TYPE_IOS = 3;//苹果IOS
    public static final int DEVICE_TYPE_WX = 3;//微信
    
    public static final int CART_MAX_COUNT = 50;//购物车商品数量最大值
    public static final int CART_MAX_DEL_COUNT = 5;//购物车最近删除的商品数量最大值
    
    
    
    /**
     * 游客申请非遗项目
     */
    public static final int UNSIGNED_MEMBER_ID = -1;//表示为游客登录，非会员
    public static final String UNSIGNED_MEMBER_NAME = "unsignedMember";//游客登录memberName默认为unsignedMember；
    
    /**
     * 商品总体评价级别
     */
    public static final short AppriseType_LEVEL_FIREST = 1;  //一星
    public static final short AppriseType_LEVEL_SECOND = 2;  //二星
    public static final short AppriseType_LEVEL_THIRD = 3;   //三星
    public static final short AppriseType_LEVEL_FORTH = 4;   //四星
    public static final short AppriseType_LEVEL_FIFTH = 5;	 //五星
    
    /**
     * 传承人、传承项目编号命名规格前缀
     */
    public static final String NO_INHERITOR_INFO = "CCR";
    public static final String NO_INHERITOR_PROJECT = "XM";
    public static final String NO_GOODS_INFO = "FY";
    
    /**
     * 订单状态
     */
    public static final int NO_PAY_STATE = 1;  //未支付状态
    public static final int DROP_STATE = 2; //取消状态
    public static final int NO_SEND_STATE = 3; //待发货状态
    public static final int DROP_REQUIRE_STATE = 4; //退款申请状态
    public static final int DROP_SUCCESS_STATE = 5; //退款成功状态
    public static final int SEND_STATE = 6; // 配送中状态
    public static final int ACCOMPLISH_STATE = 7; //完成状态
    public static final int RETURN_REQUIRE_STATE = 8; //退货申请状态
    public static final int RETURN_SUCCESS_STATE = 9; //退货成功状态
    
    /**
     * 订单支付状态
     */
    public static final int NO_PAT_STATE = 1; //未支付状态
    public static final int PAY_STATE = 2; //已支付状态
    
    /**
     * 订单配送方式
     */
    public static final int GET_BY_SELF = 0; //自提
    
	/**
	 * 通知公告发送状态  
	 */
    public static final int ANNC_STATE_SEND = 1;//发送
    public static final int ANNC_STATE_DRAFT = 2;//草稿
    
    
    /**
     * 通知公告发送对象
     */
    public static final int ANNC_SEND_USER = 1;//后台管理人员 
    public static final int ANNC_SEND_MEMBER = 2;//前台用户
    public static final int ANNC_SEND_ALL = 0;//全部
    public static final int ANNC_TARGET_ALL = -1;//全部
    public static final int ANNC_TARGET_SYSTEM = 1;//系统消息
    public static final int ANNC_TARGET_LOGISTICS = 2;//物流消息
    
    /**
     * 传承人、非遗项目审核状态
     */
    public static final int INHERITOR_STATE_NEW = 1;//待初审
    public static final int INHERITOR_STATE_SECOND = 2;//待复审
    public static final int INHERITOR_STATE_THIRD = 3;//待沟通
    public static final int INHERITOR_STATE_PASS = 4;//完成审核
    public static final int INHERITOR_STATE_FAILED = 5;//审核失败
    public static final int INHERITOR_STATE_EXHIBITION = 6;//审核失败
    
    
    /**
     * 传承人、项目审核类型
     */
    public static final int CHECK_INHERITOR_INFO = 1;//传承人审核
    public static final int CHECK_INHERITOR_PROJECT = 2;//项目审核
    public static final int CHECK_GOODSINFO  = 3;//商品审核
    
    
    /**
     * 传承人、项目审核结果
     */
    public static final int CHECK_INHERITOR_RESULT = 1;//项目审核结果
    public static final int CHECK_INHERITOR_ALL = -1;//所有审核结果
    public static final int CHECK_PASS = 1; //审核结束
    public static final int CHECK_REJECT = 0; //审核结束
    
    
    
    /**
     * 传承资质判断
     */
    public static final int IS_INHERITOR = 1;//是传承人
    public static final int IS_NOT_INHERITOR = 0;//不是传承人
    
    /**
     * 订单所在表
     */
    public static final int IN_ORDERINFO = 1;//在订单表中
    public static final int IN_HISTORYORDER = 2; //在历史订单表中
    
    /**
     * 订单类型
     */
    public static final int ORDER_TYPE_PC = 1; //pc订单
    public static final int ORDER_TYPE_TEL = 2; //手机订单
    
    
    public static final int ALIPAY = 1;//支付宝
	public static final int WXPAY = 5;//微信
	public static final int UNIONPAY = 4;//银联
    
    
    
    /**
     * 订单评论状态
     */
    public static final int ORDER_NOREVIEW_STATE = 1; //未评论状态
    public static final int ORDER_REVIEW_STATE = 2; //已评论状态
    
    /**
     * 购物车商品状态
     */
    public static final int CART_STATE_DELETE = 0; //已删除
    public static final int CART_STATE_NORMAL = 1; //正常
    public static final int CART_STATE_CHANGED = -1; //商品信息变更
    
    public static final int GOODS_LABEL_NO = 0;
    public static final int GOODS_LABEL_NEW = 1;
    public static final int GOODS_LABEL_START = 2;
    public static final int GOODS_LABEL_RANK = 3;
    
    public static final int GOODS_LABEL_START_NUM = 6;
    public static final int GOODS_LABEL_RANK_NUM = 4;
    
    /**
     * 非遗新闻浏览次数统计增长
     */
    public static final int INTANGIBLE_NEWS_SCAN_AMOUNT_ADD = 1; //每浏览一次，浏览数自动加一
    public static final int COMMENT_AMOUNT_ADD = 1; //每评论一次，评论数自动加一
    public static final int UP_AMOUNT_ADD = 1; //每点赞一次，点赞数自动加一
    
    /**
     * 非遗新闻浏览次数统计增长
     */
    public static int looknum = 0; //每浏览一次，自动加一
    
    /**
     * 商品是否是传承人项目
     */
    public static final int GOODS_IS_INHERITORPRODUCTION = 1;  //是传承人作品
    public static final int GOODS_NOT_INHERITORPRODUCTION = 0; //非传承人作品
    
    /**
     * 收藏的常量类
     */
    public static final int COLLECT_TYPE_GOODS = 1;
    public static final int COLLECT_TYPE_ARTICLE = 2;
    
    public static final int GOODS_VALUE_GLOBAL = 0;
    public static final int GOODS_VALUE_CUSTOM = -1;
    
    public static final int GOODS_ATTR_DATAORIGIN_SELECT = 0;
    public static final int GOODS_ATTR_DATAORIGIN_INPUT = 1;
    public static final int GOODS_ATTR_DATAORIGIN_SECTION = 2;
    
    //数据字典
    public static final String DICT_LABEL_INTANGIBLETYPE = "intangibleType";
    public static final String DICT_LABEL_INHERITLEVEL = "inheritLevel";
    
    //客户端使用的线上链接
//    public static final String WEB_PIC_URL_FOR_IOS = "http://app.cjfygift.com:9090/connector/restful";  //图片显示使用web连接
//    public static final String WAP_URL_FOR_IOS = "http://m.cjfygift.com";  //图文混排的描述使用wap连接
//    public static final String APP_CONNECTOR = "http://app.cjfygift.com:9090/connector";  //接口域名
    public static final String WEB_PIC_URL_FOR_IOS = "http://120.24.84.202:9090/connector/restful";  //图片显示使用web连接
    public static final String WAP_URL_FOR_IOS = "http://120.24.84.202:9091/wap";  //图文混排的描述使用wap连接
    public static final String APP_CONNECTOR = "http://120.24.84.202:9090/connector";  //接口域名
    
    public static final String APP_CACHE = "appCache";  //接口缓存
    
    public static final int CODE_LENGTH = 6;//优惠码长度
    
    public static final int CODE_STATE_CREATE = 1;//已生成状态
    public static final int CODE_STATE_GIVE = 2;//已下发状态
    public static final int CODE_STATE_USE = 3;//已使用状态
    
    public static final int CODE_TYPE_DISCOUNT = 1;//折扣码
    public static final int CODE_TYPE_MINUS = 2;//减免码
    public static final int CODE_TYPE_DEDUCTION = 3;//抵扣码
    
    /**
     * 支付方式
     */
    public static final int PAY_TYPE_ALIPAY = 1;
    public static final int PAY_TYPE_UNIONPAY_person = 2;
    public static final int PAY_TYPE_UNIONPAY_COMPANY = 3;
    public static final int PAY_TYPE_ONLINE = 4;
    public static final int PAY_TYPE_WECHAT = 5;
    
    //微信返回标识
    public static final String RETURN_CODE_SUCCESS = "SUCCESS";
    public static final String RETURN_CODE_FAILD = "FAIL";
    
    //客户端版本管理中客户端类型
    public static final Integer TERMINAL_TYPE_ANDROID = 1;
    public static final Integer TERMINAL_TYPE_IOS = 2;
    
    //商品是否在Wap端显示
    public static final Integer GOODS_SHOW_WAP = 1;
    public static final Integer GOODS_NOT_SHOW_WAP = 0;
    
    //Wap端每页数据大小
    public static final Integer WAP_PAGE_SIZE = 16;
    
    public static final Integer SALE_TYPE_DISCOUNT = 1; //商品优惠类型：商品打折
    public static final Integer SALE_TYPE_MINUS = 2;    //商品优惠类型：商品减免
    
    //公共文件的picType
    public static final Integer ENTER_FY_BANNER = 1; //走进非遗
    public static final Integer FY_VIEW_BANNER = 2; //非遗大展
    public static final Integer CREATIVE_BANNER = 3; //创意空间
    public static final Integer FY_COLLECT_BANNER = 4; //非遗收藏
    public static final Integer WAP_BANNER = 5; //wap轮播图
    public static final Integer APP_FIRSTPAGE_BANNER = 6; //客户端首页轮播图
    public static final Integer APP_FYVIEW_BANNER = 7; //客户端非遗大展页轮播图
}
